import 'package:flukit/flukit.dart';
import 'package:flutter/material.dart';
import 'package:light_image/commom/commom.dart';

class LoadingView extends StatelessWidget {
  String text = "加载中";

  LoadingView({String text = "加载中"}) {
    this.text = text;
  }

  @override
  Widget build(BuildContext context) {
    return new SizedBox(
      width: winWidth(context),
      child: new Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          AnimatedRotationBox(
            duration: Duration(milliseconds: 800),
            child: GradientCircularProgressIndicator(
              radius: 15.0,
              colors: [Colors.blue, Colors.lightBlue[50]],
              value: .8,
              backgroundColor: Colors.transparent,
              strokeCapRound: true,
            ),
          ),
//          new CircularProgressIndicator(),
//          new Space(),

          new Text(
            text,
            style: TextStyle(color: mainTextColor),
          ),
        ],
      ),
    );
  }
}
